namespace ThingsGateway.Foundation.Rpc.TouchRpc
{
    /// <summary>
    /// TouchRpcFileInfo
    /// </summary>
    public class TouchRpcFileInfo : RemoteFileInfo
    {
        /// <summary>
        /// 流位置
        /// </summary>
        public long Position { get; set; }

        /// <inheritdoc/>
        public override void Package(ByteBlock byteBlock)
        {
            base.Package(byteBlock);
            byteBlock.Write(Position);
        }

        /// <inheritdoc/>
        public override void Unpackage(ByteBlock byteBlock)
        {
            base.Unpackage(byteBlock);
            Position = byteBlock.ReadInt64();
        }
    }
}